home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / wemdemo4.zip / INFO / LEMACS.1 (.txt) < prev    next >
GNU Info File  |  1994-09-21  |  52KB  |  878 lines

  1. This is Info file ../info/lemacs, produced by Makeinfo-1.55 from the
  2. input file lemacs.txi.
  3.    This file documents the GNU Emacs editor.
  4.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  5. 1991, 1992 Lucid, Inc.
  6.    Permission is granted to make and distribute verbatim copies of this
  7. manual provided the copyright notice and this permission notice are
  8. preserved on all copies.
  9.    Permission is granted to copy and distribute modified versions of
  10. this manual under the conditions for verbatim copying, provided also
  11. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  12. General Public License" are included exactly as in the original, and
  13. provided that the entire resulting derived work is distributed under the
  14. terms of a permission notice identical to this one.
  15.    Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions, except that the sections entitled "The GNU Manifesto",
  18. "Distribution" and "GNU General Public License" may be included in a
  19. translation approved by the author instead of in the original English.
  20. File: lemacs,  Node: Top,  Next: Distrib,  Up: (dir)
  21.    The Emacs Editor ****************
  22.    Emacs is the extensible, customizable, self-documenting real-time
  23. display editor.  This Info file describes how to edit with Emacs and
  24. some of how to customize it, but not how to extend it.
  25. * Menu:
  26. * License::     The GNU General Public License gives you permission
  27.         to redistribute GNU Emacs on certain terms; and also
  28.         explains that there is no warranty.
  29. * Distrib::     How to get Emacs.
  30. * Intro::       An introduction to Emacs concepts.
  31. * Glossary::    The glossary.
  32. * Manifesto::   What's GNU?  Gnu's Not Unix!
  33. Indexes, nodes containing large menus
  34. * Key Index::      An item for each standard Emacs key sequence.
  35. * Command Index::  An item for each command name.
  36. * Variable Index:: An item for each documented variable.
  37. * Concept Index::  An item for each concept.
  38. Important General Concepts
  39. * Screen::      How to interpret what you see on the screen.
  40. * Keystrokes::  Keyboard gestures Emacs recognizes.
  41. * Pull-down Menus::
  42.                 The Lucid GNU Emacs Pull-down Menus available under X.
  43. * Mouse Selection::
  44.                 Selecting Text with the Mouse.
  45. * Keystrokes::
  46.                 Using Keystrokes to represent key sequences.
  47. * Commands::    Commands: named functions run by key sequences to do editing.
  48. * Entering Emacs::
  49.                 Starting Emacs from the shell.
  50. * Command Switches::
  51.                 Hairy startup options.
  52. * Exiting::     Stopping or killing Emacs.
  53. * Basic::       The most basic editing commands.
  54. * Undo::        Undoing recently made changes in the text.
  55. * Minibuffer::  Entering arguments that are prompted for.
  56. * M-x::         Invoking commands by their names.
  57. * Help::        Commands for asking Emacs about its commands.
  58. Important Text-Changing Commands
  59. * Mark::        The mark: how to delimit a "region" of text.
  60. * Killing::     Killing text.
  61. * Yanking::     Recovering killed text.  Moving text.
  62. * Using X Selections::
  63.                 Using primary selection, cut buffers, and highlighted regions.
  64. * Accumulating Text::
  65.                 Other ways of copying text.
  66. * Rectangles::  Operating on the text inside a rectangle on the screen.
  67. * Registers::   Saving a text string or a location in the buffer.
  68. * Display::     Controlling what text is displayed.
  69. * Search::      Finding or replacing occurrences of a string.
  70. * Fixit::       Commands especially useful for fixing typos.
  71. Larger Units of Text
  72. * Files::       All about handling files.
  73. * Buffers::     Multiple buffers; editing several files at once.
  74. * Windows::     Viewing two pieces of text at once.
  75. Advanced Features
  76. * Major Modes:: Text mode vs. Lisp mode vs. C mode ...
  77. * Indentation:: Editing the white space at the beginnings of lines.
  78. * Text::        Commands and modes for editing English.
  79. * Programs::    Commands and modes for editing programs.
  80. * Running::     Compiling, running and debugging programs.
  81. * Abbrevs::     How to define text abbreviations to reduce
  82.                  the number of characters you must type.
  83. * Picture::     Editing pictures made up of characters
  84.                  using the quarter-plane screen model.
  85. * Sending Mail::Sending mail in Emacs.
  86. * Rmail::       Reading mail in Emacs.
  87. * Recursive Edit::
  88.                 A command can allow you to do editing
  89.                  "within the command".  This is called a
  90.                  `recursive editing level'.
  91. * Narrowing::   Restricting display and editing to a portion
  92.                  of the buffer.
  93. * Sorting::    Sorting lines, paragraphs or pages within Emacs.
  94. * Shell::       Executing shell commands from Emacs.
  95. * Hardcopy::    Printing buffers or regions.
  96. * Dissociated Press::  Dissociating text for fun.
  97. * CONX::           A different kind of dissociation.
  98. * Amusements::         Various games and hacks.
  99. * Emulation::           Emulating some other editors with Emacs.
  100. * Customization::      Modifying the behavior of Emacs.
  101. Recovery from Problems.
  102. * Quitting::    Quitting and aborting.
  103. * Lossage::     What to do if Emacs is hung or malfunctioning.
  104. * Bugs::        How and when to report a bug.
  105. Here are some nodes which are inferiors of the ones already listed. They
  106. are mentioned here so you can get to them in one step:
  107. Subnodes of Screen
  108. * Point::    The place in the text where editing commands operate.
  109. * Echo Area::   Short messages appear at the bottom of the screen.
  110. * Mode Line::    Interpreting the mode line.
  111. Subnodes of Basic
  112. * Blank Lines:: Commands to make or delete blank lines.
  113. * Continuation Lines:: Lines too wide for the screen.
  114. * Position Info::      What page, line, row, or column is point on?
  115. * Arguments::          Giving numeric arguments to commands.
  116. Subnodes of Keystrokes
  117. * Representing Keystrokes::  Using lists of modifiers and keysyms to
  118.                              represent keystrokes.
  119. * Key Sequences::            Combine key strokes into key sequences you can
  120.                              bind to commands.
  121. * String Key Sequences::     Available for upward compatibility.
  122. * Meta Key::                 Using ESC to represent Meta
  123. * Super and Hyper Keys::     Adding modifier keys on certain keyboards
  124. * Character Representation:: How characters appear in Emacs buffers.
  125. * Commands::                 How commands are bound to key sequences.
  126. Subnodes of Pull-down Menus
  127. * File Menu::           Items on the File menu
  128. * Edit Menu::           Items on the Edit menu
  129. * Buffers Menu::        Information about the Buffers menu
  130. * Help Menu::           Items on the Help menu
  131. * Menu Customization::  Adding and removing menu items and related
  132.                         operations.
  133. Subnodes of Minibuffer
  134. * Minibuffer File::    Entering file names with the minibuffer.
  135. * Minibuffer Edit::    How to edit in the minibuffer.
  136. * Completion::  An abbreviation facility for minibuffer input.
  137. * Repetition::  Re-executing previous commands that used the minibuffer.
  138. Subnodes of Mark
  139. * Setting Mark::       Commands to set the mark.
  140. * Using Region::       Summary of ways to operate on contents of the region.
  141. * Marking Objects::    Commands to put region around textual units.
  142. * Mark Ring::          Previous mark positions saved so you can go back there.
  143. Subnodes of Yanking
  144. * Kill Ring::          Where killed text is stored.  Basic yanking.
  145. * Appending Kills::    Several kills in a row all yank together.
  146. * Earlier Kills::      Yanking something killed some time ago.
  147. Subnodes of Registers
  148. * RegPos::             Saving positions in registers.
  149. * RegText::            Saving text in registers.
  150. * RegRect::            Saving rectangles in registers.
  151. Subnodes of Display
  152. * Scrolling::               Moving text up and down in a window.
  153. * Horizontal Scrolling::   Moving text left and right in a window.
  154. * Selective Display::      Hiding lines with lots of indentation.
  155. * Display Vars::           Information on variables for customizing display.
  156. Subnodes of Search
  157. * Incremental Search::     Search happens as you type the string.
  158. * Non-Incremental Search::  Specify entire string and then search.
  159. * Word Search::        Search for sequence of words.
  160. * Regexp Search::       Search for match for a regexp.
  161. * Regexps::            Syntax of regular expressions.
  162. * Search Case::           To ignore case while searching, or not.
  163. * Replace::            Search, and replace some or all matches.
  164. * Unconditional Replace::  Everything about replacement except for querying.
  165. * Query Replace::          How to use querying.
  166. * Other Repeating Search:: Operating on all matches for some regexp.
  167. Subnodes of Fixit
  168. * Kill Errors:: Commands to kill a batch of recently entered text.
  169. * Transpose::   Exchanging two characters, words, lines, lists...
  170. * Fixing Case:: Correcting case of last word entered.
  171. * Spelling::    Apply spelling checker to a word, or a whole file.
  172. Subnodes of Files
  173. * File Names::  How to type and edit file name arguments.
  174. * Visiting::    Visiting a file prepares Emacs to edit the file.
  175. * Saving::      Saving makes your changes permanent.
  176. * Backup::      How Emacs saves the old version of your file.
  177. * Interlocking::How Emacs protects against simultaneous editing
  178.                  of one file by two users.
  179. * Reverting::   Reverting cancels all the changes not saved.
  180. * Auto Save::   Auto Save periodically protects against loss of data.
  181. * ListDir::     Listing the contents of a file directory.
  182. * Dired::       "Editing" a directory to delete, rename, etc.
  183.                  the files in it.
  184. * Misc File Ops:: Other things you can do on files.
  185. Subnodes of Buffers
  186. * Select Buffer::   Creating a new buffer or reselecting an old one.
  187. * List Buffers::    Getting a list of buffers that exist.
  188. * Misc Buffer::     Renaming; changing read-only status.
  189. * Kill Buffer::     Killing buffers you no longer need.
  190. * Several Buffers:: How to go through the list of all buffers
  191.                      and operate variously on several of them.
  192. Subnodes of Windows
  193. * Basic Window::    Introduction to Emacs windows.
  194. * Split Window::    New windows are made by splitting existing windows.
  195. * Other Window::    Moving to another window or doing something to it.
  196. * Pop Up Window::   Finding a file or buffer in another window.
  197. * Change Window::   Deleting windows and changing their sizes.
  198. Subnodes of Using X Selections
  199. * X Clipboard Selection::     Storing the primary selection.
  200. * Active Regions::  Using zmacs-style highlighting of the selected region.
  201. * X Cut Buffers::   X cut buffers are available for compatibility.
  202. Subnodes of Indentation
  203. * Indentation Commands:: Various commands and techniques for indentation.
  204. * Tab Stops::   You can set arbitrary "tab stops" and then
  205.                  indent to the next tab stop when you want to.
  206. * Just Spaces:: You can request indentation using just spaces.
  207. Subnodes of Text
  208. * Text Mode::   The major mode for editing text files.
  209. * Nroff Mode::  The major mode for editing input to the formatter nroff.
  210. * TeX Mode::    The major mode for editing input to the formatter TeX.
  211. * Outline Mode::The major mode for editing outlines.
  212. * Words::       Moving over and killing words.
  213. * Sentences::   Moving over and killing sentences.
  214. * Paragraphs::    Moving over paragraphs.
  215. * Pages::    Moving over pages.
  216. * Filling::     Filling or justifying text
  217. * Case::        Changing the case of text
  218. Subnodes of Programs
  219. * Program Modes::       Major modes for editing programs.
  220. * Lists::       Expressions with balanced parentheses.
  221.                  There are editing commands to operate on them.
  222. * Defuns::      Each program is made up of separate functions.
  223.                  There are editing commands to operate on them.
  224. * Grinding::    Adjusting indentation to show the nesting.
  225. * Matching::    Insertion of a close-delimiter flashes matching open.
  226. * Comments::    Inserting, illing and aligning comments.
  227. * Balanced Editing::    Inserting two matching parentheses at once, etc.
  228. * Lisp Completion::     Completion on symbol names in Lisp code.
  229. * Documentation::       Getting documentation of functions you plan to call.
  230. * Change Log::  Maintaining a change history for your program.
  231. * Tags::        Go direct to any function in your program in one
  232.                  command.  Tags remembers which file it is in.
  233. * Fortran::    Fortran mode and its special features.
  234. Subnodes of Running
  235. * Compilation::       Compiling programs in languages other than Lisp
  236.                        (C, Pascal, etc.)
  237. * Lisp Modes::        Various modes for editing Lisp programs, with
  238.                        different facilities for running the Lisp programs.
  239. * Lisp Libraries::    Creating Lisp programs to run in Emacs.
  240. * Lisp Interaction::  Executing Lisp in an Emacs buffer.
  241. * Lisp Eval::         Executing a single Lisp expression in Emacs.
  242. * Lisp Debug::        Debugging Lisp programs running in Emacs.
  243. * External Lisp::     Communicating through Emacs with a separate Lisp.
  244. Subnodes of Abbrevs
  245. * Defining Abbrevs::  Defining an abbrev, so it will expand when typed.
  246. * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
  247. * Editing Abbrevs::   Viewing or editing the entire list of defined abbrevs.
  248. * Saving Abbrevs::    Saving the entire list of abbrevs for another session.
  249. * Dynamic Abbrevs::   Abbreviations for words already in the buffer.
  250. Subnodes of Picture
  251. * Basic Picture::     Basic concepts and simple commands of Picture Mode.
  252. * Insert in Picture:: Controlling direction of cursor motion
  253.                        after "self-inserting" characters.
  254. * Tabs in Picture::   Various features for tab stops and indentation.
  255. * Rectangles in Picture:: Clearing and superimposing rectangles.
  256. Subnodes of Sending Mail
  257. * Mail Format::       Format of the mail being composed.
  258. * Mail Headers::      Details of allowed mail header fields.
  259. * Mail Mode::         Special commands for editing mail being composed.
  260. Subnodes of Rmail
  261. * Rmail Scrolling::   Scrolling through a message.
  262. * Rmail Motion::      Moving to another message.
  263. * Rmail Deletion::    Deleting and expunging messages.
  264. * Rmail Inbox::       How mail gets into the Rmail file.
  265. * Rmail Files::       Using multiple Rmail files.
  266. * Rmail Output::      Copying message out to files.
  267. * Rmail Labels::      Classifying messages by labeling them.
  268. * Rmail Summary::     Summaries show brief info on many messages.
  269. * Rmail Reply::       Sending replies to messages you are viewing.
  270. * Rmail Editing::     Editing message text and headers in Rmail.
  271. * Rmail Digest::      Extracting the messages from a digest message.
  272. Subnodes of Shell
  273. * Single Shell::      Commands to run one shell command and return.
  274. * Interactive Shell:: Permanent shell taking input via Emacs.
  275. * Shell Mode::        Special Emacs commands used with permanent shell.
  276. Subnodes of Customization
  277. * Minor Modes::       Each minor mode is one feature you can turn on
  278.                        independently of any others.
  279. * Variables::         Many Emacs commands examine Emacs variables
  280.                        to decide what to do; by setting variables,
  281.                        you can control their functioning.
  282. * Examining::         Examining or setting one variable's value.
  283. * Edit Options::      Examining or editing list of all variables' values.
  284. * Locals::            Per-buffer values of variables.
  285. * File Variables::    How files can specify variable values.
  286. * Keyboard Macros::   A keyboard macro records a sequence of keystrokes
  287.                        to be replayed with a single command.
  288. * Key Bindings::      The keymaps say what command each key runs.
  289.                        By changing them, you can "redefine keys".
  290. * Keymaps::           Definition of the keymap data structure.
  291. * Rebinding::         How to redefine one key's meaning conveniently.
  292. * Disabling::         Disabling a command means confirmation is required
  293.                        before it can be executed.  This is done to protect
  294.                        beginners from surprises.
  295. * Syntax::            The syntax table controls how words and expressions
  296.                        are parsed.
  297. * Init File::         How to write common customizations in the `.emacs'
  298.                        file.
  299. * Audible Bell::      Changing how Emacs sound the bell.
  300. * Faces::
  301.                       Changing the fonts and colors of a region of text.
  302. Subnodes of Lossage (and recovery)
  303. * Stuck Recursive::   `[...]' in mode line around the parentheses.
  304. * Screen Garbled::    Garbage on the screen.
  305. * Text Garbled::      Garbage in the text.
  306. * Unasked-for Search::Spontaneous entry to incremental search.
  307. * Emergency Escape::  Emergency escape--
  308.                        What to do if Emacs stops responding.
  309. * Total Frustration:: When you are at your wits' end.
  310. File: lemacs,  Node: Distrib,  Next: License,  Prev: Top,  Up: Top
  311. Distribution
  312. ************
  313.    Lucid GNU Emacs is "free"; this means that everyone is free to use
  314. it and free to redistribute it on a free basis.  Lucid GNU Emacs is not
  315. in the public domain; it is copyrighted and there are restrictions on
  316. its distribution, but these restrictions are designed to permit
  317. everything that a good cooperating citizen would want to do.  What is
  318. not allowed is to try to prevent others from further sharing any
  319. version of GNU Emacs that they might get from you.  The precise
  320. conditions are found in the GNU General Public License that comes with
  321. Emacs and also appears following this section.
  322.    The easiest way to get a copy of GNU Emacs is from someone else who
  323. has it.  You need not ask for permission to do so, or tell any one
  324. else; just copy it.
  325.    If you have access to the Internet, you can send mail to Lucid and we
  326. will send you information on how you can get a copy. Since the
  327. information may change, we are asking you to send mail rather than
  328. giving you instructions on how to get the copy. The email address is:
  329.      emacs-distribution@lucid.com
  330.    If you do not have access to the Internet, you can send mail to Lucid
  331. and we will send back instructions on how to obtain a copy. The address
  332.      Emacs Distribution
  333.      Lucid, Inc.
  334.      707 Laurel Street
  335.      Menlo Park, California 94025
  336. Getting Earlier Versions of GNU Emacs
  337. =====================================
  338.    Lucid GNU Emacs, the version of Emacs described in this manual, is
  339. not distributed by the Free Software Foundation. You can, however,
  340. still get other versions of Emacs from there.
  341.    If you have access to the Internet, you can get the latest
  342. distribution version of GNU Emacs from host `prep.ai.mit.edu' using
  343. anonymous login.  See the file `/u2/emacs/GETTING.GNU.SOFTWARE' on that
  344. host to find out about your options for copying and which files to use.
  345.    You may also receive GNU Emacs when you buy a computer.  Computer
  346. manufacturers are free to distribute copies on the same terms that
  347. apply to everyone else.  These terms require them to give you the full
  348. sources, including whatever changes they may have made, and to permit
  349. you to redistribute the GNU Emacs received from them under the usual
  350. terms of the General Public License.  In other words, the program must
  351. be free for you when you get it, not just free for the manufacturer.
  352.    If you cannot get a copy in any of those ways, you can order one from
  353. the Free Software Foundation.  Though Emacs itself is free, the Free
  354. Software Foundation's distribution service is not.  An order form is
  355. included in the file `etc/DISTRIB' in the Emacs distribution.  For
  356. further information, write to
  357.      Free Software Foundation
  358.      675 Mass Ave
  359.      Cambridge, MA 02139
  360.      USA
  361.    The income from distribution fees goes to support the foundation's
  362. purpose: the development of more free software to distribute just like
  363. GNU Emacs.
  364.    If you find GNU Emacs useful, please send a donation to the Free
  365. Software Foundation.  This will help support development of the rest of
  366. the GNU system, and other useful software beyond that.  Your donation
  367. is tax deductible.
  368. File: lemacs,  Node: License,  Next: Intro,  Prev: Distrib,  Up: Top
  369. GNU GENERAL PUBLIC LICENSE
  370. **************************
  371.                        Version 1, February 1989
  372.      Copyright (C) 1989 Free Software Foundation, Inc.
  373.      675 Mass Ave, Cambridge, MA 02139, USA
  374.      
  375.      Everyone is permitted to copy and distribute verbatim copies
  376.      of this license document, but changing it is not allowed.
  377. Preamble
  378. ========
  379.    The license agreements of most software companies try to keep users
  380. at the mercy of those companies.  By contrast, our General Public
  381. License is intended to guarantee your freedom to share and change free
  382. software--to make sure the software is free for all its users.  The
  383. General Public License applies to the Free Software Foundation's
  384. software and to any other program whose authors commit to using it.
  385. You can use it for your programs, too.
  386.    When we speak of free software, we are referring to freedom, not
  387. price.  Specifically, the General Public License is designed to make
  388. sure that you have the freedom to give away or sell copies of free
  389. software, that you receive source code or can get it if you want it,
  390. that you can change the software or use pieces of it in new free
  391. programs; and that you know you can do these things.
  392.    To protect your rights, we need to make restrictions that forbid
  393. anyone to deny you these rights or to ask you to surrender the rights.
  394. These restrictions translate to certain responsibilities for you if you
  395. distribute copies of the software, or if you modify it.
  396.    For example, if you distribute copies of a such a program, whether
  397. gratis or for a fee, you must give the recipients all the rights that
  398. you have.  You must make sure that they, too, receive or can get the
  399. source code.  And you must tell them their rights.
  400.    We protect your rights with two steps: (1) copyright the software,
  401. and (2) offer you this license which gives you legal permission to copy,
  402. distribute and/or modify the software.
  403.    Also, for each author's protection and ours, we want to make certain
  404. that everyone understands that there is no warranty for this free
  405. software.  If the software is modified by someone else and passed on, we
  406. want its recipients to know that what they have is not the original, so
  407. that any problems introduced by others will not reflect on the original
  408. authors' reputations.
  409.    The precise terms and conditions for copying, distribution and
  410. modification follow.
  411.                          TERMS AND CONDITIONS
  412.   1. This License Agreement applies to any program or other work which
  413.      contains a notice placed by the copyright holder saying it may be
  414.      distributed under the terms of this General Public License.  The
  415.      "Program", below, refers to any such program or work, and a "work
  416.      based on the Program" means either the Program or any work
  417.      containing the Program or a portion of it, either verbatim or with
  418.      modifications.  Each licensee is addressed as "you".
  419.   2. You may copy and distribute verbatim copies of the Program's source
  420.      code as you receive it, in any medium, provided that you
  421.      conspicuously and appropriately publish on each copy an
  422.      appropriate copyright notice and disclaimer of warranty; keep
  423.      intact all the notices that refer to this General Public License
  424.      and to the absence of any warranty; and give any other recipients
  425.      of the Program a copy of this General Public License along with
  426.      the Program.  You may charge a fee for the physical act of
  427.      transferring a copy.
  428.   3. You may modify your copy or copies of the Program or any portion of
  429.      it, and copy and distribute such modifications under the terms of
  430.      Paragraph 1 above, provided that you also do the following:
  431.         * cause the modified files to carry prominent notices stating
  432.           that you changed the files and the date of any change; and
  433.         * cause the whole of any work that you distribute or publish,
  434.           that in whole or in part contains the Program or any part
  435.           thereof, either with or without modifications, to be licensed
  436.           at no charge to all third parties under the terms of this
  437.           General Public License (except that you may choose to grant
  438.           warranty protection to some or all third parties, at your
  439.           option).
  440.         * If the modified program normally reads commands interactively
  441.           when run, you must cause it, when started running for such
  442.           interactive use in the simplest and most usual way, to print
  443.           or display an announcement including an appropriate copyright
  444.           notice and a notice that there is no warranty (or else,
  445.           saying that you provide a warranty) and that users may
  446.           redistribute the program under these conditions, and telling
  447.           the user how to view a copy of this General Public License.
  448.         * You may charge a fee for the physical act of transferring a
  449.           copy, and you may at your option offer warranty protection in
  450.           exchange for a fee.
  451.      Mere aggregation of another independent work with the Program (or
  452.      its derivative) on a volume of a storage or distribution medium
  453.      does not bring the other work under the scope of these terms.
  454.   4. You may copy and distribute the Program (or a portion or
  455.      derivative of it, under Paragraph 2) in object code or executable
  456.      form under the terms of Paragraphs 1 and 2 above provided that you
  457.      also do one of the following:
  458.         * accompany it with the complete corresponding machine-readable
  459.           source code, which must be distributed under the terms of
  460.           Paragraphs 1 and 2 above; or,
  461.         * accompany it with a written offer, valid for at least three
  462.           years, to give any third party free (except for a nominal
  463.           charge for the cost of distribution) a complete
  464.           machine-readable copy of the corresponding source code, to be
  465.           distributed under the terms of Paragraphs 1 and 2 above; or,
  466.         * accompany it with the information you received as to where the
  467.           corresponding source code may be obtained.  (This alternative
  468.           is allowed only for noncommercial distribution and only if you
  469.           received the program in object code or executable form alone.)
  470.      Source code for a work means the preferred form of the work for
  471.      making modifications to it.  For an executable file, complete
  472.      source code means all the source code for all modules it contains;
  473.      but, as a special exception, it need not include source code for
  474.      modules which are standard libraries that accompany the operating
  475.      system on which the executable file runs, or for standard header
  476.      files or definitions files that accompany that operating system.
  477.   5. You may not copy, modify, sublicense, distribute or transfer the
  478.      Program except as expressly provided under this General Public
  479.      License.  Any attempt otherwise to copy, modify, sublicense,
  480.      distribute or transfer the Program is void, and will automatically
  481.      terminate your rights to use the Program under this License.
  482.      However, parties who have received copies, or rights to use
  483.      copies, from you under this General Public License will not have
  484.      their licenses terminated so long as such parties remain in full
  485.      compliance.
  486.   6. By copying, distributing or modifying the Program (or any work
  487.      based on the Program) you indicate your acceptance of this license
  488.      to do so, and all its terms and conditions.
  489.   7. Each time you redistribute the Program (or any work based on the
  490.      Program), the recipient automatically receives a license from the
  491.      original licensor to copy, distribute or modify the Program
  492.      subject to these terms and conditions.  You may not impose any
  493.      further restrictions on the recipients' exercise of the rights
  494.      granted herein.
  495.   8. The Free Software Foundation may publish revised and/or new
  496.      versions of the General Public License from time to time.  Such
  497.      new versions will be similar in spirit to the present version, but
  498.      may differ in detail to address new problems or concerns.
  499.      Each version is given a distinguishing version number.  If the
  500.      Program specifies a version number of the license which applies to
  501.      it and "any later version", you have the option of following the
  502.      terms and conditions either of that version or of any later
  503.      version published by the Free Software Foundation.  If the Program
  504.      does not specify a version number of the license, you may choose
  505.      any version ever published by the Free Software Foundation.
  506.   9. If you wish to incorporate parts of the Program into other free
  507.      programs whose distribution conditions are different, write to the
  508.      author to ask for permission.  For software which is copyrighted
  509.      by the Free Software Foundation, write to the Free Software
  510.      Foundation; we sometimes make exceptions for this.  Our decision
  511.      will be guided by the two goals of preserving the free status of
  512.      all derivatives of our free software and of promoting the sharing
  513.      and reuse of software generally.
  514.                                 NO WARRANTY
  515.  10. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  516.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  517.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  518.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  519.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  520.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  521.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  522.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  523.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  524.      SERVICING, REPAIR OR CORRECTION.
  525.  11. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  526.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  527.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  528.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  529.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  530.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  531.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  532.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  533.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  534.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  535.                       END OF TERMS AND CONDITIONS
  536. Appendix: How to Apply These Terms to Your New Programs
  537. =======================================================
  538.    If you develop a new program, and you want it to be of the greatest
  539. possible use to humanity, the best way to achieve this is to make it
  540. free software which everyone can redistribute and change under these
  541. terms.
  542.    To do so, attach the following notices to the program.  It is safest
  543. to attach them to the start of each source file to most effectively
  544. convey the exclusion of warranty; and each file should have at least the
  545. "copyright" line and a pointer to where the full notice is found.
  546.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  547.      Copyright (C) 19YY  NAME OF AUTHOR
  548.      
  549.      This program is free software; you can redistribute it and/or modify
  550.      it under the terms of the GNU General Public License as published by
  551.      the Free Software Foundation; either version 1, or (at your option)
  552.      any later version.
  553.      
  554.      This program is distributed in the hope that it will be useful,
  555.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  556.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  557.      GNU General Public License for more details.
  558.      
  559.      You should have received a copy of the GNU General Public License
  560.      along with this program; if not, write to the Free Software
  561.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  562.    Also add information on how to contact you by electronic and paper
  563. mail.
  564.    If the program is interactive, make it output a short notice like
  565. this when it starts in an interactive mode:
  566.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  567.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  568.      This is free software, and you are welcome to redistribute it
  569.      under certain conditions; type `show c' for details.
  570.    The hypothetical commands `show w' and `show c' should show the
  571. appropriate parts of the General Public License.  Of course, the
  572. commands you use may be called something other than `show w' and `show
  573. c'; they could even be mouse-clicks or menu items--whatever suits your
  574. program.
  575.    You should also get your employer (if you work as a programmer) or
  576. your school, if any, to sign a "copyright disclaimer" for the program,
  577. if necessary.  Here a sample; alter the names:
  578.      Yoyodyne, Inc., hereby disclaims all copyright interest in the
  579.      program `Gnomovision' (a program to direct compilers to make passes
  580.      at assemblers) written by James Hacker.
  581.      
  582.      SIGNATURE OF TY COON, 1 April 1989
  583.      Ty Coon, President of Vice
  584.    That's all there is to it!
  585. File: lemacs,  Node: Intro,  Next: Glossary,  Prev: License,  Up: Top
  586. Introduction
  587. ************
  588.    You are reading about GNU Emacs, the GNU incarnation of the advanced,
  589. self-documenting, customizable, extensible real-time display editor
  590. Emacs.  (The `G' in `GNU' is not silent.)
  591.    We say that Emacs is a "display" editor because normally the text
  592. being edited is visible on the screen and is updated automatically as
  593. you type.  *Note Display: Screen.
  594.    We call Emacs a "real-time" editor because the display is updated
  595. very frequently, usually after each character or pair of characters you
  596. type.  This minimizes the amount of information you must keep in your
  597. head as you edit.  *Note Real-time: Basic.
  598.    We call Emacs advanced because it provides facilities that go beyond
  599. simple insertion and deletion: filling of text; automatic indentation of
  600. programs; viewing two or more files at once; and dealing in terms of
  601. characters, words, lines, sentences, paragraphs, and pages, as well as
  602. expressions and comments in several different programming languages.
  603. It is much easier to type one command meaning "go to the end of the
  604. paragraph" than to find that spot with simple cursor keys.
  605.    "Self-documenting" means that at any time you can type a special
  606. character, `Control-h', to find out what your options are.  You can
  607. also use `C-h' to find out what a command does, or to find all the
  608. commands relevant to a topic.  *Note Help::.
  609.    "Customizable" means you can change the definitions of Emacs
  610. commands.  For example, if you use a programming language in which
  611. comments start with `<**' and end with `**>', you can tell the Emacs
  612. comment manipulation commands to use those strings (*note Comments::.).
  613. Another sort of customization is rearrangement of the command set.
  614. For example, you can set up the four basic cursor motion commands (up,
  615. down, left and right) on keys in a diamond pattern on the keyboard if
  616. you prefer.  *Note Customization::.
  617.    "Extensible" means you can go beyond simple customization and write
  618. entirely new commands, programs in the Lisp language to be run by
  619. Emacs's own Lisp interpreter.  Emacs is an "on-line extensible" system:
  620. it is divided into many functions that call each other.  You can
  621. redefine any function in the middle of an editing session and replace
  622. any part of Emacs without making a separate copy of all of Emacs.  Most
  623. of the editing commands of Emacs are written in Lisp; the few
  624. exceptions could have been written in Lisp but are written in C for
  625. efficiency.  Only a programmer can write an extension to Emacs, but
  626. anybody can use it afterward.
  627. File: lemacs,  Node: Screen,  Next: Keystrokes,  Prev: Concept Index,  Up: Top
  628. The Emacs Screen
  629. ****************
  630.    Since Emacs was developed on environments that only had one window
  631. taking up the whole screen, the terminology used here reflects those
  632. environments:
  633. Screen
  634.      In many environments, such as a tty terminal, an Emacs screen
  635.      literally takes up the whole screen.  If you are running Emacs in
  636.      a multi-window system like the X Window System, the Emacs screen
  637.      takes up one X window.  *Note Emacs under X::, for more
  638.      information.
  639. Window
  640.      No matter what environment you are running in, Emacs allows you to
  641.      look at several buffers at the same time by having several windows
  642.      be part of the screen.  Often, the whole screen is taken up by
  643.      just one window, but you can split the screen into two or more
  644.      subwindows.  If you are running Emacs under the X window system,
  645.      that means you can have several "Emacs windows" inside the X
  646.      window that contains the Emacs screen.  You can even have multiple
  647.      screens in different X windows, each with their own set of
  648.      subwindows.
  649.    Each Emacs screen displays a variety of information:
  650.    * The biggest area usually displays the text you are editing.  It may
  651.      consist of one window or of two windows or more if you need to
  652.      look at two buffers a the same time.
  653.    * Below each text window's last line is a "mode line" (*note Mode
  654.      Line::.), which describes what is going on in that window.  The
  655.      mode line is in inverse video if the terminal supports that.  If
  656.      there are several Emacs windows in one screen, each window has its
  657.      own mode line.
  658.    * At the bottom of each Emacs screen is the "echo area" or
  659.      "minibuffer window"(*note Echo Area::.).  It is used by Emacs to
  660.      exchange information with the user.  There is only one echo area
  661.      per Emacs screen.
  662.    * If you are running Lucid GNU  Emacs under the X Window System, a
  663.      menu bar at the top of the screen makes shortcuts to several of the
  664.      commands available (*note Pull-down Menus::.).
  665.    You can subdivide the Emacs screen into multiple text windows, and
  666. use each window for a different file (*note Windows::.).  Multiple Emacs
  667. windows are tiled vertically on the Emacs screen.  The upper Emacs
  668. window is separated from the lower window by its mode line.
  669.    When there are multiple, tiled Emacs windows on a single Emacs
  670. screen, the Emacs window receiving input from the keyboard has the
  671. "keyboard focus" and is called the "selected window".  The selected
  672. window contains the cursor which indicates the insertion point.  If you
  673. are working in an environment that permits multiple Emacs screens, and
  674. you move the focus from one Emacs screen into another, the selected
  675. window is the one that was last selected in that screen.
  676.    The same text can be displayed simultaneously in several Emacs
  677. windows, which can be in different Emacs screens.  If you alter the text
  678. in an Emacs buffer by editing it in one Emacs window, the changes are
  679. visible in all Emacs windows containing that buffer.
  680. * Menu:
  681. * Point::            The place in the text where editing commands operate.
  682. * Echo Area::           Short messages appear at the bottom of the screen.
  683. * Mode Line::            Interpreting the mode line.
  684. * Emacs under X::       Some information on Using Emacs under the X
  685.                         Window System.
  686. * Pull-down Menus::     Menus available in Lucid GNU Emacs
  687. File: lemacs,  Node: Emacs under X,  Prev: Screen,  Up: Screen
  688. Using Emacs under the X Window System
  689. =====================================
  690.    Lucid GNU Emacs can be used with the X Window System and a window
  691. manager like MWM or TWM.  In that case, the X Window System window
  692. manager opens, closes, and resizes Emacs screens.  You use the window
  693. manager's mouse gestures to perform the operations.  Consult your window
  694. manager guide or reference manual for information on manipulating X
  695. windows.
  696.    When you are working under X, each X window (that is, each Emacs
  697. screen) has a menu bar for mouse-controlled operations (*note Pull-down
  698. Menus::.).
  699.    Emacs under X is also a multi-screen Emacs.  You can call the
  700. function `x-new-screen' or use the New Screen menu item from the File
  701. menu to create a new Emacs screen in a new X window from the same
  702. process.  The different screens will share the same buffer list, but
  703. you can look at different buffers in the different screens. You can
  704. control the number of screens associated with the current display, by
  705. setting the variable `x-screen-count'.
  706.    The function `find-file-new-screen' is just like `find-file', but
  707. creates a new screen to display the buffer in first.
  708.    The function `switch-to-buffer-new-screen' is just like
  709. `switch-to-buffer', but creates a new screen to display the buffer in
  710. first.
  711.    You can specify a different default screen size other than the one
  712. provided. Use the variable `screen-default-alist', which is an alist of
  713. default values for screen creation other than the first one.  These may
  714. be set in your init file, like this:
  715.        (setq screen-default-alist ((width . 80) (height . 55)))
  716.    For values specific to the first Emacs screen, you must use X
  717. resources.  The variable `x-screen-defaults' takes an alist of default
  718. screen creation parameters for X window screens.  These override what is
  719. specified in `~/.Xdefaults' but are overridden by the arguments to the
  720. particular call to `x-create-screen'.
  721.    When you create a new screen, the variable `create-screen-hook' is
  722. called with one argument, the screen just created.
  723.    If you want to close one or more of the X windows you created using
  724. New Screen, use the Close menu item from the File menu.
  725.    If you are working with multiple screens, some special information
  726. applies:
  727.    * Two variables, `screen-title-format' and
  728.      `screen-icon-title-format' determine the title of the screen and
  729.      the title of the icon that results if you shrink the screen.
  730.    * The variables `auto-lower-screen' and `auto-raise-screen' position
  731.      a screen. If true, `auto-lower-screen' lowers a screen to the
  732.      bottom when it is no longer selected. If true, `auto-raise-screen'
  733.      raises a screen to the top when it is selected. Under X, most
  734.      ICCCM-compliant window managers will have options to do this for
  735.      you, but these variables are provided in case you are using a
  736.      broken window manager.
  737.    * There is a new screen/modeline format directive, %S, which expands
  738.      to the name of the current screen (a screen's name is distinct
  739.      from its title; the name is used for resource lookup, among other
  740.      things, and the title is simply what appears above the window.)
  741. File: lemacs,  Node: Echo Area,  Next: Mode Line,  Prev: Point,  Up: Screen
  742. The Echo Area
  743. =============
  744.    The line at the bottom of the screen (below the mode line) is the
  745. "echo area".  Emacs uses this area to communicate with the user:
  746.    *   "Echoing" means printing out the characters that the user types.
  747.      Emacs never echoes single-character commands.  Multi-character
  748.      commands are echoed only if you pause while typing them: As soon
  749.      as you pause for more than one second in the middle of a command,
  750.      all the characters of the command so far are echoed.  This is
  751.      intended to "prompt" you for the rest of the command.  Once
  752.      echoing has started, the rest of the command is echoed immediately
  753.      as you type it.  This behavior is designed to give confident users
  754.      fast response, while giving hesitant users maximum feedback.  You
  755.      can change this behavior by setting a variable (*note Display
  756.      Vars::.).
  757.    *   If you issue a command that cannot be executed, Emacs may print
  758.      an "error message" in the echo area.  Error messages are
  759.      accompanied by a beep or by flashing the screen.  Any input you
  760.      have typed ahead is thrown away when an error happens.
  761.    *   Some commands print informative messages in the echo area.  These
  762.      messages look similar to error messages, but are not announced
  763.      with a beep and do not throw away input.  Sometimes a message
  764.      tells you what the command has done, when this is not obvious from
  765.      looking at the text being edited.  Sometimes the sole purpose of a
  766.      command is to print a message giving you specific information.
  767.      For example, the command `C-x =' is used to print a message
  768.      describing the character position of point in the text and its
  769.      current column in the window.  Commands that take a long time
  770.      often display messages ending in `...' while they are working, and
  771.      add `done' at the end when they are finished.
  772.    *   The echo area is also used to display the "minibuffer", a window
  773.      that is used for reading arguments to commands, such as the name
  774.      of a file to be edited.  When the minibuffer is in use, the echo
  775.      area displays with a prompt string that usually ends with a colon.
  776.      The cursor appears after the prompt.  You can always get out of
  777.      the minibuffer by typing `C-g'.  *Note Minibuffer::.
  778. File: lemacs,  Node: Mode Line,  Prev: Echo Area,  Up: Screen
  779. The Mode Line
  780. =============
  781.    Each text window's last line is a "mode line" which describes what is
  782. going on in that window.  When there is only one text window, the mode
  783. line appears right above the echo area.  The mode line is in inverse
  784. video if the terminal supports that, starts and ends with dashes, and
  785. contains text like `Emacs: SOMETHING'.
  786.    If a mode line has something else in place of `Emacs: SOMETHING',
  787. the window above it is in a special subsystem such as Dired.  The mode
  788. line then indicates the status of the subsystem.
  789.    Normally, the mode line has the following appearance:
  790.      --CH-Emacs: BUF      (MAJOR MINOR)----POS------
  791. This gives information about the buffer being displayed in the window:
  792. the buffer's name, what major and minor modes are in use, whether the
  793. buffer's text has been changed, and how far down the buffer you are
  794. currently looking.
  795.    CH contains two stars `**' if the text in the buffer has been edited
  796. (the buffer is "modified"), or `--' if the buffer has not been edited.
  797. Exception: for a read-only buffer, it is `%%'.
  798.    BUF is the name of the window's chosen "buffer".  The chosen buffer
  799. in the selected window (the window that the cursor is in) is also
  800. Emacs's selected buffer, the buffer in which editing takes place.  When
  801. we speak of what some command does to "the buffer", we mean the
  802. currently selected buffer.  *Note Buffers::.
  803.    POS tells you whether there is additional text above the top of the
  804. screen, or below the bottom.  If your file is small and it is
  805. completely visible on the screen, POS is `All'.  Otherwise, POS is
  806. `Top' if you are looking at the beginning of the file, `Bot' if you are
  807. looking at the end of the file, or `NN%', where NN is the percentage of
  808. the file above the top of the screen.
  809.    MAJOR is the name of the "major mode" in effect in the buffer.  At
  810. any time, each buffer is in one and only one major mode.  The available
  811. major modes include Fundamental mode (the least specialized), Text
  812. mode, Lisp mode, and C mode.  *Note Major Modes::, for details on how
  813. the modes differ and how you select one.
  814.    MINOR is a list of some of the "minor modes" that are turned on in
  815. the window's chosen buffer.  For example, `Fill' means that Auto Fill
  816. mode is on.  `Abbrev' means that Word Abbrev mode is on.  `Ovwrt' means
  817. that Overwrite mode is on.  *Note Minor Modes::, for more information.
  818. `Narrow' means that the buffer being displayed has editing restricted
  819. to only a portion of its text.  This is not really a minor mode, but is
  820. like one.  *Note Narrowing::.  `Def' means that a keyboard macro is
  821. being defined.  *Note Keyboard Macros::.
  822.    Some buffers display additional information after the minor modes.
  823. For example, Rmail buffers display the current message number and the
  824. total number of messages.  Compilation buffers and Shell mode display
  825. the status of the subprocess.
  826.    If Emacs is currently inside a recursive editing level, square
  827. brackets (`[...]') appear around the parentheses that surround the
  828. modes.  If Emacs is in one recursive editing level within another,
  829. double square brackets appear, and so on.  Since information on
  830. recursive editing applies to Emacs in general and not to any one buffer,
  831. the square brackets appear in every mode line on the screen or not in
  832. any of them.  *Note Recursive Edit::.
  833.    Emacs can optionally display the time and system load in all mode
  834. lines.  To enable this feature, type `M-x display-time'.  The
  835. information added to the mode line usually appears after the file name,
  836. before the mode names and their parentheses.  It looks like this:
  837.      HH:MMpm L.LL [D]
  838. (Some fields may be missing if your operating system cannot support
  839. them.) HH and MM are the hour and minute, followed always by `am' or
  840. `pm'.  L.LL is the average number of running processes in the whole
  841. system recently.  D is an approximate index of the ratio of disk
  842. activity to cpu activity for all users.
  843.    The word `Mail' appears after the load level if there is mail for
  844. you that you have not read yet.
  845.    Customization note: the variable `mode-line-inverse-video' controls
  846. whether the mode line is displayed in inverse video (assuming the
  847. terminal supports it); `nil' means no inverse video.  The default
  848. is`t'.  For X screens, simply set the foreground and background colors
  849. appropriately.
  850. File: lemacs,  Node: Point,  Next: Echo Area,  Prev: Screen,  Up: Screen
  851. Point
  852. =====
  853.    When Emacs is running, the cursor shows the location at which editing
  854. commands will take effect.  This location is called "point".  You can
  855. use keystrokes or the mouse cursor to move point through the text and
  856. edit the text at different places.
  857.    While the cursor appears to point AT a character, you should think
  858. of point as BETWEEN two characters: it points BEFORE the character on
  859. which the cursor appears.  Sometimes people speak of "the cursor" when
  860. they mean "point", or speak of commands that move point as "cursor
  861. motion" commands.
  862.    Each Emacs screen has only one cursor.  When output is in progress,
  863. the cursor must appear where the typing is being done.  This does not
  864. mean that point is moving.  It is only that Emacs has no way to show
  865. you the location of point except when the terminal is idle.
  866.    If you are editing several files in Emacs, each file has its own
  867. point location.  A file that is not being displayed remembers where
  868. point is.  Point becomes visible at the correct location when you look
  869. at the file again.
  870.    When there are multiple text windows, each window has its own point
  871. location.  The cursor shows the location of point in the selected
  872. window.  The visible cursor also shows you which window is selected.  If
  873. the same buffer appears in more than one window, point can be moved in
  874. each window independently.
  875.    The term `point' comes from the character `.', which was the command
  876. in TECO (the language in which the original Emacs was written) for
  877. accessing the value now called `point'.
  878.